﻿using QD.LopPlat.UI.Model.Sys;
using QD.SQLHelper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QD.LopPlat.UI.Code.DbContent
{
    public class DbData : EFDbContext
    {
        private static DbData instance;
        private static object sysObj = new object();

        public static DbData Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (sysObj)
                    {
                        if (instance == null)
                        {
                            instance = new DbData();
                        }
                    }
                }

                return instance;
            }
        }

        public DbData()
            : base(DbConfig.Instance.GetDbMasterConnStr())
        { }
    }
}
